<!--  -->
<template>
    <div style="padding-bottom: 42px">

        <van-form @submit="onSubmit" @failed="failedMethod">

            <!-- 头部 -->
            <div class="font15 mt10">
                <div class="pl10">
                    <span class="titletext ">{{ params.isDrawup == '1' ? '商机转项目起草' : nFromdata.title }}</span>
                </div>

                <div v-if="params.isDrawup != '1'" class="graytext mt10 mb5 font13 pl10">
                    <span>工单编号：</span>
                    <span class="titletext">{{ nFromdata.pmInsId }}</span>
                </div>

                <div v-if="params.isDrawup == '1'" class="redtext mt10 mb5 font13 pl10">
                    <span>提示：该表单带*字段都为必填项</span>
                </div>

                <div class="bcolor-e" style="height: 2px;"></div>
            </div>

            <section-header sectionTitle="商机信息"></section-header>
            <van-cell-group>

                <van-field readonly required name="projectType" :value="mFromdata.projectType" label="项目（收入合同）类型："
                    label-width="11em" />
                <van-field readonly required name="projectIdentification" :value="mFromdata.projectIdentification"
                    label="主子项目标识：" label-width="7em" />
                <van-field readonly required name="decisionType" :value="mFromdata.decisionType" label="标前决策类型："
                    label-width="7em" />
                <van-field readonly required name="decisionMakingPmInsId" :value="mFromdata.decisionMakingPmInsId"
                    label="标前决策工单编号：" label-width="9em" />
                <van-field readonly required name="competeType" :value="mFromdata.competeType" label="项目竞争方式："
                    label-width="7em" />
                <van-field readonly required name="projectModel" :value="mFromdata.projectModel" label="项目实施类型："
                    label-width="7em" />
                <van-field readonly required name="businessId" :value="mFromdata.businessId" label="商机编号："
                    label-width="5em" />
                <van-field readonly required name="businessName" :value="mFromdata.businessName" label="商机项目名称："
                    label-width="7em" />
                <van-field readonly name="groupUnitCode" :value="mFromdata.groupUnitCode" label="决策集团单位编码："
                    label-width="9em" />
                <van-field readonly name="groupUnitName" :value="mFromdata.groupUnitName" label="决策集团单位名称："
                    label-width="9em" />
                <van-field readonly required name="city" :value="mFromdata.city" label="地市：" label-width="3em" />
                <van-field readonly required name="counties" :value="mFromdata.counties" label="县区："
                    label-width="3em" />
                <div class="redtext font11" style="margin: 5px 15px 0px 15px;">说明：创建项目时可重新选择集团客户单位，若存在集团客户单位变动请重新选择。
                </div>
                <van-field readonly required :right-icon="formEditable ? 'arrow' : ''" name="publicCountyCodeValue"
                           :value="mFromdata.publicCountyCodeValue" label="县域组织(公开市场):" label-width="10em"
                           @click="showCountyPicke()" />
                <van-popup v-model="showCountyPopup" position="bottom" get-container="body">
                  <van-picker show-toolbar value-key="name" :columns="showCountyPickeColumns"
                              @confirm="showCountyPickeOnConfirm" @cancel="showCountyPopup = false" />
                </van-popup>
                <div v-if="formEditable"
                    style="display: flex; justify-content: flex-end; align-items: center; height: 50px;">
                    <el-button type="primary" size="small" icon="search" style="margin-right: 16px;"
                        @click="select_xm_showPopupView = true">
                        选择父项目
                    </el-button>
                </div>
                <page-select-xm-list v-if="select_xm_showPopupView" v-on:update-flag="select_xm_showPopupView = false"
                    v-on:select-item="handleSelectItem" pageTitle="父项目.列表"
                    url="esopBusinessToProject$api$findAllDirectSigning"
                    :withoutKV="{ 'direction': 'desc', 'properties':'createdTime' }"
                    :withoutBody="{ 'creator': user.userName, 'projectIdentification': '主项目', 'projectType': '框架订单,框架结算,统谈分签' }">
                    <template #body="{item}">
                        <div>
                            <div class="titlefont"> {{ '【' + item.businessId + '】' + item.businessName }}</div>
                            <div class="infosfont"> 项目名称: {{ item.projectEstablishName }}</div>
                            <div class="infosfont"> 项目编码: {{ item.projectEstablishNumber }} </div>
                        </div>
                    </template>
                </page-select-xm-list>



                <van-field :readonly="!formEditable" required autosize type="textarea" rows="1"
                    name="taggingDescription" v-model="mFromdata.taggingDescription" label="应标项目描述：" label-width="7em"
                    :rules="[{ required: formEditable, message: '请输入应标项目描述' }]" />
                <van-field :readonly="!formEditable" required autosize type="textarea" rows="1" name="openDescription"
                    v-model="mFromdata.openDescription" label="开标项目描述：" label-width="7em"
                    :rules="[{ required: formEditable, message: '请输入开标项目描述' }]" />
                <van-field :readonly="!formEditable" required autosize type="textarea" rows="1" name="buildContent"
                    v-model="mFromdata.buildContent" label="项目建设内容：" label-width="7em"
                    :rules="[{ required: formEditable, message: '请输入项目建设内容' }]" />

                <van-field readonly required name="industryPullBasis" :value="mFromdata.industryPullBasis"
                    label="行业拉动依据：" label-width="7em" :right-icon="formEditable ? 'arrow' : ''"
                    @click="industryPullBasisClick" :rules="[{ required: formEditable, message: '请输入行业拉动依据' }]" />
                <van-popup v-model="industryPullBasisShowPopupView" position="bottom" get-container="body">
                    <van-picker show-toolbar :value-key="'value'" :columns="industryPullBasisPopupColumns"
                        @confirm="industryPullBasisClickConfirm" @cancel="industryPullBasisShowPopupView = false" />
                </van-popup>

                <van-field readonly required name="isPmo" :value="mFromdata.isPmo" label="是否纳入PMO管理：" label-width="10em"
                    :right-icon="formEditable ? 'arrow' : ''" @click="isPmoClick"
                    :rules="[{ required: formEditable, message: '请输入是否纳入PMO管理' }]" />
                <van-popup v-model="isPmoShowPopupView" position="bottom" get-container="body">
                    <van-picker show-toolbar :value-key="'label'" :columns="isPmoPopupColumns"
                        @confirm="isPmoClickConfirm" @cancel="isPmoShowPopupView = false" />
                </van-popup>

            </van-cell-group>


            <!-- PMO成员信息 -->
            <div v-if="mFromdata.isPmo == '是'" class="mt10" style="display: flex; border-bottom: 1px solid #ebedf0">
                <div class="blue_item"></div>
                <span class="font15" style="display: flex; line-height: 33px; margin-left: 5px; flex: 1">PMO成员信息</span>
                <el-button block style="display: inline-block; width:auto; height: 33px;margin-right: 16px;"
                    type="primary" size="small" icon="plus" @click="pmoTeamListHandleAppend">
                    添加PMO成员
                </el-button>
            </div>
            <el-table v-if="mFromdata.isPmo == '是'" :data="mFromdata.pmoTeamList" border style="width: 100%"
                :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
                <el-table-column prop="memberRole" label="成员角色" width="120" />
                <el-table-column prop="memberTreuname" label="成员姓名" width="120" />
                <el-table-column prop="memberUsername" label="成员OA账户" width="120" />
                <el-table-column prop="memberPosition" label="成员职位" width="120" />
                <el-table-column prop="memberDepartment" label="成员部门" width="120" />
                <el-table-column prop="memberPhone" label="联系方式" width="120" />
                <el-table-column prop="joinDate" label="加入日期" width="120" />
                <el-table-column v-if="formEditable" label="操作" width="150">
                    <!-- slot-scope="scope" //取到当前单元格 
                scope.$index //拿到当前行的index
                scope.row //拿到当前行的数据对象 -->
                    <template slot-scope="scope">
                        <div style="white-space: nowrap; display: inline-block">
                            <el-button type="primary" size="small"
                                @click="pmoTeamListHandleEdit(scope.$index, scope.row)">编辑</el-button>
                            <el-button type="danger" size="small"
                                @click="pmoTeamListHandleDelete(scope.$index, scope.row)">删除</el-button>
                        </div>
                    </template>
                </el-table-column>
            </el-table>

            <sjzxm-pmo-page v-if="pmo_page_showPopupView" @update-flag="pmo_page_showPopupView = false"
                @select-item="pmoPageConfirm" :withoutData="pmo_page_data" />


            <section-header sectionTitle="项目立项信息"></section-header>
            <van-cell-group>

                <van-field readonly name="projectEstablishNumber" :value="mFromdata.projectEstablishNumber"
                    label="立项项目编码：" label-width="7em" placeholder="无需填写系统生成" />
                <van-field readonly name="projectNumberParent" :value="mFromdata.projectNumberParent" label="父项目编码："
                    label-width="6em" placeholder="无需填写系统生成" />
                <van-field readonly name="subProjectNumber" :value="mFromdata.subProjectNumber" label="子项目编码："
                    label-width="6em" placeholder="无需填写系统生成" />

                <van-field :readonly='!formEditable' required name="projectEstablishName"
                    v-model="mFromdata.projectEstablishName" label="立项项目名称：" label-width="7em"
                    placeholder="地市+县区+客户单位名称+项目名称"
                    :rules="[{ required: formEditable, message: '请输入立项项目名称且不能包含特殊字符' }]" />
                <div class="redtext font11" style="margin: 5px 15px 0px 15px;">
                    格式：地市+县区+客户单位名称+项目名称（“+”是连接符提示，请不要写进立项项目名称里）
                </div>
                <van-field :readonly='!formEditable' required name="projectEstimateMoney"
                    v-model="mFromdata.projectEstimateMoney" label="项目预估金额(万元)：" label-width="10.5em"
                    :rules="[{ required: formEditable, message: '请输入项目预估金额' }]" />
                <van-field :readonly='!formEditable' required name="estimateCost" v-model="mFromdata.estimateCost"
                    label="估算成本(万元)：" label-width="8.5em" :rules="[{ required: formEditable, message: '请输入估算成本' }]" />
                <van-field :readonly='!formEditable' required name="estimateIncome" v-model="mFromdata.estimateIncome"
                    label="估算收益(万元)：" label-width="8.5em" :rules="[{ required: formEditable, message: '请输入估算收益' }]" />
                <div class="redtext font11" style="margin: 5px 15px 0px 15px;">
                    备注：估算成本(万元)、估算收益(万元)来源于标前决策(移动)。<br>估算收益(万元)计算公式为：标前决策(移动) (估算成本(万元) * 估算收益(%)) / 100 = 估算收益(万元)
                </div>
                <van-field :readonly='!formEditable' autosize type="textarea" rows="1" name="defaults"
                    v-model="mFromdata.defaults" label="业务信息描述：" label-width="7em" placeholder="介绍信息化信息" />

                <!-- <van-field readonly name="managerAppointmentTime" :value="mFromdata.managerAppointmentTime"
                    label="项目交付经理要求任命时间：" label-width="12em" />
                <van-field readonly name="materialReleaseDate" :value="mFromdata.materialReleaseDate"
                    label="项目资料要求交底日期：" label-width="11em" /> -->
            </van-cell-group>



            <!-- 跳转意见 -->
            <div v-if="showOpinionMoudle" class="left_botton">
                <button block type="button" @click="tomsg()" style="color:#60a9ec; display: inline-block;width:100%;border: 0px solid #60a9ec;border-radius: 15px 0px 0px 15px;
            padding:10px 10px 10px 15px;font-size:13px">意见</button>
            </div>

            <!-- 流转下一步 -->
            <div v-if="showNextButton" class="footer">
                <van-button block type="info" native-type="submit"
                    style="display: inline-block; width: 100%; border: 0px solid #60a9ec">流转下一步</van-button>
            </div>
        </van-form>


        <!-- 当前办理人 -->
        <section-header v-if="showHistoryMoudle" sectionTitle="当前办理人"></section-header>
        <div v-if="showHistoryMoudle" class="font13 ptandpb10 pl16">
            <div>
                <span class="titletext font13">{{
                    historydata.MANAGER
                    }}</span>
            </div>
            <div class="mt5">
                <span class="graytext font12">{{ historydata.DEPARTMENT }}</span>
            </div>
        </div>


        <!-- 审批意见 -->
        <section-header v-if="showOpinionMoudle" id="opinion" sectionTitle="审批意见"></section-header>
        <opinion-item v-if="showOpinionMoudle" :approveList="approveList"></opinion-item>

    </div>
</template>


<script>

import { mapGetters } from "vuex";
import { Dialog, Notify, Toast } from "vant";
import moment from 'moment'

import { openFileUrl } from "@/store/openFile";
import util from "@/assets/js/public";

import {
  getDictList,
  getFormDetail,
  getWfOptMags,
  getWfLinkTracks,
  getEsopBusinessToProjectByPmInsId, getPublicCountyCode,

} from "@/api/dictapi";

import SectionHeader from '../sztdzj/sztdzjDetail/section-header.vue';
import OpinionItem from '../sztdzj/sztdzjDetail/opinion-item.vue';
import PageSelectXmList from '/src/components/page_select_xm_list/index.vue';
import sjzxm_pmo_page from './sjzxm_pmo_page.vue';

export default {
    data() {
        return {
            params: this.$route.query,
            todotype: false,
            toRead: false,
            approveList: [],
            historydata: {},
            nFromdata: {},
            mFromdata: {
                pmoTeamList: [],
            },
            industryPullBasisShowPopupView: false,
            industryPullBasisPopupColumns: [],
            isPmoShowPopupView: false,
            isPmoPopupColumns: [{ value: '是', label: '是' }, { value: '否', label: '否' }],
            select_xm_showPopupView: false,
            pmo_page_showPopupView: false,
            pmo_page_data: {},
            pmo_page_index: 0,
            showCountyPopup:false,
            showCountyPickeColumns:[]
        };
    },
    computed: {
        ...mapGetters(["user"]),
        ...mapGetters(["userinfo"]),
        formEditable() {
            return this.params.location === 'dict.start' || this.params.isDrawup == '1';
        },
        /// 意见
        showOpinionMoudle() {
            return this.params.isDrawup != '1';
        },
        showHistoryMoudle() {
            return this.params.todoType == "2" && (this.historydata && Object.keys(this.historydata).length > 0 && this.historydata.MANAGER) && this.params.isDrawup != '1';
        },
        showNextButton() {
            return this.todotype || this.toRead || this.params.isDrawup == '1';
        }
    },

    //生命周期--挂载完成
    components: {
        SectionHeader,
        OpinionItem,
        PageSelectXmList,
        sjzxm_pmo_page
    },
    //生命周期--创建完成
    created() {
    },
    //生命周期--挂载完成
    mounted() {
        /// 办理 - 从待办进来（界面每次都会重新创建，所以不需要考虑缓存的问题）
        if (this.$route.query.isDrawup != '1') {
            this.params = this.$route.query;
            if (this.params.pmInsType == null && this.params.processType != null) {
                this.params.pmInsType = this.params.processType
            }
            if (this.params.todoType == "1") {
                this.todotype = true;
            }
            else if (this.params.todoType == "3") {
                this.toRead = true;
            }
            this.requestFlowDetail();
        }
    },
    activated() {
    },
    beforeRouteEnter(to, from, next) {
        next(vm => {
            // console.log('AA', to, 'AAAA', from);
            // 起草 - 从二级商机列表进来（界面因为保活问题，第二次从商机列表进来的时候 created方法不会重新调用，所以需要确保商机列表进来（或唤醒）时，要刷新起草数据）
            // 通过 `vm` 访问组件实例
            if (to.query.isDrawup == '1' && from.name === 'drawup_transition_tab') {
                vm.params = to.query;
                vm.requestDrawupInfo(to.query.projectId);
            }
        });
    },
    //方法调用
    methods: {
      showCountyPicke(){
        if(this.mFromdata.city){
          this.getPublicCountyCode(true)
        }else {
          Notify('请先选择父项目')
        }
      },
      showCountyPickeOnConfirm(value){
        this.showCountyPopup=false
        this.mFromdata.publicCountyCodeValue=value.name
        this.mFromdata.publicCountyCode=value.value
      },
        getPublicCountyCode(isPick) {
          getPublicCountyCode({userName:this.user.userName,city:this.mFromdata.city})
              .then((result)=>{
                Toast.clear();
                if(!result.data){
                  Notify(result.message);
                  return;
                }
                if(result.data.data){
                  if (isPick==true){
                    this.showCountyPickeColumns=result.data.data
                    this.showCountyPopup=true
                  }else {
                    let cityList=result.data.data
                    for (let i in cityList){
                      if (cityList[i].value==this.mFromdata.publicCountyCode){
                        this.mFromdata={...this.mFromdata,...{publicCountyCodeValue:cityList[i].name}}
                        break
                      }
                    }
                  }
                }
              })
        },
        failedMethod(data) {
            console.log('submit fail:', data);
            const errorArr = data.errors;
            const errorObj = errorArr[0];
            const errorMessage = errorObj.message;
            Toast({ type: 'text', message: errorMessage, duration: 1000 });
        },
        tomsg() {
            document.getElementById('opinion').scrollIntoView({ behavior: 'smooth' })
        },
        openFileUrlfun(value) {
            this.$router.push({
                name: "fileview",
                query: {
                    openFileUrl: openFileUrl(value),
                },
            });
        },
        // TODO: 点击事件
        // 选择父项目
        projectClick() {
        },
        // 选择父项目 回调
        handleSelectItem(value) {
            this.select_xm_showPopupView = false;
            this.mFromdata.competeType = value.competeType;
            this.mFromdata.businessId = value.businessId;
            this.mFromdata.businessName = value.businessName;
            this.mFromdata.city = value.city;
            this.mFromdata.counties = value.counties;
            this.mFromdata.customerCode = value.customerCode;
            this.mFromdata.customerName = value.customerName;
            // 决策集团单位信息
            this.mFromdata.groupUnitCode = value.groupUnitCode?value.groupUnitCode:value.customerCode;
            this.mFromdata.groupUnitName = value.groupUnitName?value.groupUnitName:value.customerName;
            // 设置父项目编号
            this.mFromdata.projectNumberParent = value.projectEstablishNumber;
            this.mFromdata.decisionMakingPmInsId = value.decisionMakingPmInsId;
            this.mFromdata.projectType = value.projectType;
            this.mFromdata.decisionType = value.decisionType;
            this.mFromdata.projectModel = value.projectModel;
            this.mFromdata.projectIdentification = '子项目';
        },
        // 行业拉动依据 首次点击做网络请求
        industryPullBasisClick() {
            if (this.formEditable) {
                if (this.industryPullBasisPopupColumns.length === 0) {
                    this.requestIndustryPullBasis();
                }
                else {
                    this.industryPullBasisShowPopupView = true;
                }
            }
        },
        // 行业拉动依据 选中
        industryPullBasisClickConfirm(value) {
            this.industryPullBasisShowPopupView = false;
            this.mFromdata.industryPullBasis = value.value;
        },
        // 是否纳入PMO管理 
        isPmoClick() {
            if (this.formEditable) {
                this.isPmoShowPopupView = true;
            }
        },
        // 是否专项债 选中
        isPmoClickConfirm(value) {
            this.isPmoShowPopupView = false;
            this.mFromdata.isPmo = value.value;
        },
        // TODO: PMO成员信息
        pmoTeamListHandleDelete(index, row) {
            Dialog.confirm({
                title: '提示',
                message: '确定删除吗？',
            }).then(() => {
                this.mFromdata.pmoTeamList.splice(index, 1);
            });
        },

        pmoTeamListHandleEdit(index, row) {
            console.log('pmoTeamListHandleEdit', row);
            this.pmo_page_index = index;
            this.pmo_page_data = row;
            this.pmo_page_showPopupView = true;
        },

        pmoTeamListHandleAppend() {
            this.pmo_page_index = -1;
            this.pmo_page_data = {};
            this.pmo_page_showPopupView = true;
        },
        // TODO:PMO成员信息回调 
        pmoPageConfirm(value) {
            this.pmo_page_showPopupView = false;
            if (this.pmo_page_index === -1) {
                this.mFromdata.pmoTeamList.push(value);
            }
            else {
                this.$set(this.mFromdata.pmoTeamList, this.pmo_page_index, value)
            }
        },
        // TODO: 网络请求
        /// 行业拉动依据 下拉框数据
        requestIndustryPullBasis() {
            Toast.loading({ message: "加载中", forbidClick: false });
            getDictList('industryPullBasisType', { userName: this.user.userName }).then((result) => {
                Toast.clear();
                if (!result.data) {
                    Notify(result.message);
                    return;
                }
                if (result.data.data) {
                    this.industryPullBasisPopupColumns = result.data.data;
                    this.industryPullBasisShowPopupView = true;
                }
            });
        },
        /// 项目流转 的请求
        requestFlowDetail() {
            Toast.loading({ message: "加载中", forbidClick: false });
            getFormDetail(Object.assign(this.params, {
                userName: this.user.userName,
            })).then((result) => {
                Toast.clear();
                if (!result.data) {
                    Notify(result.message);
                    return;
                }
                if (result.data.data) {
                    this.nFromdata = result.data.data;
                }
                this.getEsopBusinessToProjectByPmInsId();
            })
            getWfOptMags(Object.assign(this.params, {
                userName: this.user.userName,
            })).then((result) => {
                Toast.clear();
                if (!result.data) {
                    Notify(result.message);
                    return;
                }
                this.approveList = result.data.data.reverse();
            })
            if (this.params.todoType == "2") {
                getWfLinkTracks(Object.assign(this.params, {
                    userName: this.user.userName,
                })).then((result) => {
                    Toast.clear();
                    if (!result.data) {
                        Notify(result.message);
                        return;
                    }
                    if (result.data.data) {
                        //数据过滤，并生成新的数组
                        this.historydata = result.data.data.filter(
                            (item) => item.CURRENTSTATE == 10
                        )[0];
                    }
                })
            }
        },
        getEsopBusinessToProjectByPmInsId(value) {
            getEsopBusinessToProjectByPmInsId(this.params.pmInsId).then((result) => {
                Toast.clear();
                if (!result.data) {
                    Notify(result.message);
                    return;
                }
                if (result.data.data) {
                    this.mFromdata = result.data.data;
                    this.getPublicCountyCode(false)
                }
            });
        },
        onSubmit() {
            if (this.mFromdata.isPmo == '是' && (this.mFromdata.pmoTeamList == null || this.mFromdata.pmoTeamList == undefined || this.mFromdata.pmoTeamList.length == 0)) {
                Dialog.alert({
                    title: '提示',
                    message: 'PMO成员不可为空，请添加人员！',
                });
                return
            }
            //提交流转
            // console.log("传给递交页面:", this.params)
            // console.log("formDataformData", JSON.stringify(this.mFromdata));
            this.controlRule(this.params, this.mFromdata.businessId, this.onNext);
            // this.controlRule(this.params, this.mFromdata.businessId, function () {
            //     this.onNext();
            // }.bind(this));
        },
        // 流转下一步
        onNext() {
            var formSendData = { "htmlParamMap": {} };
            formSendData.htmlParamMap = this.mFromdata;
            formSendData.id = this.nFromdata.id;
            formSendData.pmInsId = this.nFromdata.pmInsId;
            formSendData.processType = this.params.pmInsType
            formSendData.workItemId = this.params.workItemId;
            let currentUserCode = util.encrypt(this.user.userName);
            var params1 = {
                kv: {
                    currentUserCode: currentUserCode,
                    source: 'MOBILE',
                    location: this.params.location,
                    processInstId: this.params.processInstId,
                    processDefName: this.params.processDefName,
                    processType: this.params.pmInsType,
                },
            };
            var params2 = {
                kv: {
                    "currentUserCode": currentUserCode,
                    "source": 'MOBILE',
                    "location": this.params.location,
                    "processInstId": this.params.processInstId,
                    'processType': this.params.pmInsType,
                    'receiptCode': this.params.processInstId
                },
            };
            var params3 = {
                kv: {
                    "source": 'MOBILE',
                    "currentUserCode": currentUserCode,
                    "workItemId": this.params.todoType == 3 ? "" : this.params.workItemId,
                    "processInstId": this.params.processInstId,
                    "location": this.params.location,
                    "notificationId": this.params.todoType == 3 ? this.params.wfnid : ""
                },
            };
            console.log('AAAAAAA', this.user.userName, params1);
            localStorage.setItem('submitPageParam', JSON.stringify({
                getDecisionsUrl: 'decisionAndUser$api$getDecisions',
                getUserUrl: 'decisionAndUser$api$getOrgAndUser',
                tosubmintUrl: 'applicationFormEnhance$api$startSubmitProcess',
                getDecisionsParams: params1,
                getUserParams: params2,
                tosubmintParams: params3,
                formData: formSendData,
                fromMoa: this.params.fromMoa,
                type: this.params.todoType == 3 ? "toRead" : "toDo"
            }));
            this.$router.push({
                name: "srqrsubmit"
            });
        },
    },
};
</script>

<style scoped>
/* @import url();*/
</style>